import React from 'react';

import {Layout, Menu, Input,} from 'antd';

import {Link} from 'react-router-dom';

const {Header} = Layout;
const {Search} = Input;

class HeaderMenu extends React.Component {
    render() {
        return (
            <Header style={{position: 'fixed', zIndex: 1, width: '100%'}}>
                <div className="logo">
                </div>

                    <Menu
                        theme="dark"
                        mode="horizontal"
                        // defaultSelectedKeys={['2']}
                        selectable={false}
                        style={{lineHeight: '64px'}}
                    >
                        <Menu.Item key="1">
                            <Link to="/">
                                首页
                            </Link>
                        </Menu.Item>
                        <Menu.Item key="2">
                            <Link to="/algorithm">
                                算法
                            </Link>
                        </Menu.Item>
                        <Menu.Item key="3">
                            <Link to="/ai">
                            人工智能
                            </Link>
                        </Menu.Item>
                        <Menu.Item key="4">
                            <Link to="/tools">
                            金融工具
                            </Link>
                        </Menu.Item>
                        <Menu.Item key="5" disabled={false} style={{position: "absolute", right: "50px"}}>
                            <Search
                                placeholder="input search text"
                                onSearch={value => console.log(value)}
                                style={{width: "auto"}}
                            />
                        </Menu.Item>
                        <Menu.Item key="6" style={{position: "absolute", right: '10px'}}>
                            <Link to="/about">
                            关于
                            </Link>
                        </Menu.Item>
                    </Menu>

            </Header>
        );
    }
}

export default HeaderMenu;